home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / src / bin / warp / next / OptionsObject.m < prev    next >
Text File  |  1993-06-29  |  3KB  |  175 lines

  1.  
  2. #import <stdio.h>
  3. #import "point3.h"
  4. #import "api.h" 
  5. #import "OptionsObject.h"
  6.  
  7. @implementation OptionsObject
  8. ;
  9. static id autoUpdateID;
  10. static id gridSizeID;
  11. static id numberStepsID;
  12. static id pathID;
  13. static id prefixID;
  14. static id retainID;
  15. static id sendFilesID;
  16. static id sendGeomviewID;
  17. static id sizeRelativelyID;
  18. static id stepsFormID;
  19. static id widgetGeomID;
  20. static id widgetSizeID;
  21.  
  22. - awakeFromNib
  23. {
  24.   autoUpdateID = autoUpdate;
  25.   gridSizeID = gridSize;
  26.   numberStepsID = numberSteps;
  27.   pathID = path;
  28.   prefixID = prefix;
  29.   retainID = retain;
  30.   sendFilesID = sendFiles;
  31.   sendGeomviewID = sendGeomview;
  32.   sizeRelativelyID = sizeRelatively;
  33.   stepsFormID = stepsForm;
  34.   widgetGeomID = widgetGeom;
  35.   widgetSizeID = widgetSize;
  36.   [optionsPanel setAvoidsActivation:YES];
  37.   return self;
  38. }
  39.  
  40. - changeWidgetGeom:sender
  41. {
  42.   apiUpdateGeom();
  43.   return self;
  44. }
  45.  
  46. - changeWidgetSize:sender
  47. {
  48.   apiUpdateScale();
  49.   return self;
  50. }
  51.  
  52. void uiSetSteps(int steps) {
  53.   [numberStepsID setIntValue:steps at:0];
  54. }
  55.  
  56. int uiGetSteps() {
  57.   return [numberStepsID intValueAt:0];
  58. }
  59.  
  60. void uiSetStart(int start) {
  61.   [stepsFormID setIntValue:start at:0];
  62. }
  63.  
  64. int uiGetStart() {
  65.   return [stepsFormID intValueAt:0];
  66. }
  67.  
  68. void uiSetEnd(int end) {
  69.   [stepsFormID setIntValue:end at:1];
  70. }
  71.  
  72. int uiGetEnd() {
  73.   return [stepsFormID intValueAt:1];
  74. }
  75.  
  76. void uiSetIntToGV(int val) {
  77.   [sendGeomviewID setState:val];
  78. }
  79.  
  80. int uiGetIntToGV() {
  81.   return [sendGeomviewID state];
  82. }
  83.  
  84. void uiSetIntToFiles(int val) {
  85.   [sendFilesID setState:val];
  86. }
  87.  
  88. int uiGetIntToFiles() {
  89.   return [sendFilesID state];
  90. }
  91.  
  92. void uiSetAutoUpdate(int val) {
  93.   [autoUpdateID setState:val];
  94. }
  95.  
  96. int uiGetAutoUpdate() {
  97.   return [autoUpdateID state];
  98. }
  99.  
  100. void uiSetRetain(int val) {
  101.   [retainID setState:val];
  102. }
  103.  
  104. int uiGetRetain() {
  105.   return [retainID state];
  106. }
  107.  
  108. void uiSetPrefix(const char *prefix) {
  109.   [prefixID setStringValue:prefix at:0];
  110. }
  111.  
  112. const char *uiGetPrefix() {
  113.   return [prefixID stringValueAt:0];
  114. }
  115.  
  116. void uiSetPath(const char *path) {
  117.   [pathID setStringValue:path at:0];
  118. }
  119.  
  120. const char *uiGetPath() {
  121.   return [pathID stringValueAt:0];
  122. }
  123.  
  124. void uiSetWidgetGeom(const char *geom) {
  125.   [widgetGeomID setStringValue:geom at:0];
  126. }
  127.  
  128. const char *uiGetWidgetGeom() {
  129.   return [widgetGeomID stringValueAt:0];
  130. }
  131.  
  132. void uiSetWidgetSize(float size) {
  133.   [widgetSizeID setFloatValue:size at:0];
  134. }
  135.  
  136. float uiGetWidgetSize() {
  137.   return [widgetSizeID floatValueAt:0];
  138. }
  139.  
  140. void uiSetRelativeSize(int val) {
  141.   [sizeRelativelyID setState:val];
  142. }
  143.  
  144. int uiGetRelativeSize() {
  145.   return [sizeRelativelyID state];
  146. }
  147.  
  148. void uiSetGridX(int x) {
  149.   [gridSizeID setIntValue:x at:0];
  150. }
  151.  
  152. int uiGetGridX() {
  153.   return [gridSizeID intValueAt:0];
  154. }
  155.  
  156. void uiSetGridY(int y) {
  157.   [gridSizeID setIntValue:y at:1];
  158. }
  159.  
  160. int uiGetGridY() {
  161.   return [gridSizeID intValueAt:1];
  162. }
  163.  
  164. void uiSetGridZ(int z) {
  165.   [gridSizeID setIntValue:z at:2];
  166. }
  167.  
  168. int uiGetGridZ() {
  169.   return [gridSizeID intValueAt:2];
  170. }
  171.  
  172. @end
  173.  
  174.   
  175.